POV-Ray : Newsgroups : povray.advanced-users : vturbulence in functions? : Re: vturbulence in functions? Server Time
29 Jul 2024 12:26:40 EDT (-0400)
  Re: vturbulence in functions?  
From: Rune
Date: 29 Mar 2002 15:42:23
Message: <3ca4d1af@news.povray.org>
"Christopher James Huff" wrote:
> Noise won't give an even distribution anyway.
> I think this is the way POV combines them though.

Well I don't know. Try to render the code below with different values of
Freq.

#declare Freq = 6.2;
#declare C = 10000;
#while (C>0)
   sphere {
      vturbulence(2,0.5,1,Freq*C), 0.05
      pigment {rgb 10}
   }
   #declare C = C-1;
#end
camera {location -100*z look_at 0 angle 3}
plane {-z,-10 pigment {checker rgb 6, rgb 7}}

Setting Freq to any non-integer value gives a rather spherical distribution.
But setting Freq to an integer value gives an exact box-shaped distribution.
More strangely, it seems to be the exact same distribution no matter which
integer value you choose! I find this very confusing, and I think it's
related to the grid-like appearances in the noise pattern.

> A warp function analogous to the transform functions
> would be very useful, and I think it's been suggested
> before...but if you look at the code, warps are pretty
> embedded in patterns. It might have been decided it was
> better to wait until that code was in better shape
> (or to wait for 4.0).

I can only hope...

> I forgot about that...well, the workaround is to scale
> it down into the [0, 1] range in the function and scale
> it back outside.

What do you mean? Using atan2() and tan(), or...?

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.